namespace Cos.Core.NHibernate
{
    public class BlogArticleTagDataModel
    {
        #region Constructors and Destructors

        public BlogArticleTagDataModel() { }

        #endregion

        #region Properties

        public virtual string TagCultureCode { get; set; }

        public virtual int ArticleId { get; set; }

        public virtual string TagName { get; set; }

        // public virtual TagDataModel Tag { get; set; }

        // public virtual ArticleDataModel Article { get; set; }

        #endregion

        #region Object Overrides

        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return false;
            }

            var model = obj as BlogArticleTagDataModel;

            return model != null && this.ArticleId == model.ArticleId && this.TagName == model.TagName;
        }

        public override int GetHashCode()
        {
            return this.ArticleId.GetHashCode() ^ this.TagName.GetHashCode();
        }

        #endregion
    }
}